package com.cyz.web.app.bridge;

import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;

/**
 * 锤子
 */
@Slf4j
@AllArgsConstructor
public class Hammer implements Weapon {

    private final Enchantment enchantment;


    @Override
    public void wield() {
        log.info("挥舞锤子");
        enchantment.onActivate();
    }

    @Override
    public void swing() {
        log.info("摇摆锤子");
        enchantment.apply();
    }

    @Override
    public void unWield() {
        log.info("停止挥舞锤子");
        enchantment.onDeactivate();
    }

    @Override
    public Enchantment getEnchantment() {
        return enchantment;
    }
}
